package com.gdkj.enums;

/**
 * 挖掘横幅枚举
 *
 * @author: zw
 * @date: 2022/12/26
 **/
public enum DiggingBannerEnums {
    SWTS(1, "首位探索进度达到目标","探索达到XXX米"),
    DRSWTS(2, "首位单日探索达到目标","今日探索达到XXX米"),
    YSDJ(3, "玉石任务抽到大奖","在玉石任务抽中"),
    DRYSDJ(4, "单日获得玉石数达目标","今日获得XXX块玉石"),
    YSTX(5, "玉石任务提现成功","在玉石任务中提现XXX元");

    private Integer type;

    private String name;

    private String content;

    DiggingBannerEnums(Integer type, String name,String content) {
        this.type = type;
        this.name = name;
        this.content = content;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public static String getNameByType(Integer value){
        DiggingBannerEnums[] enums = DiggingBannerEnums.values();
        for (DiggingBannerEnums typeEnums : enums){
            if(typeEnums.type.equals(value)){
                return typeEnums.name;
            }
        }
        return null;
    }


    public static String getContentByType(Integer value){
        DiggingBannerEnums[] enums = DiggingBannerEnums.values();
        for (DiggingBannerEnums typeEnums : enums){
            if(typeEnums.type.equals(value)){
                return typeEnums.content;
            }
        }
        return null;
    }
}
